<html>
<script type="text/javascript" src="${staticPath}/js/order/jquery-1.7.2.js"></script>
<script type="text/javascript" src="${staticPath}/js/order/jquery.cookie.js"></script>
<script type="text/javascript"> 
	//CPS联盟推单 必须来源是联盟才推
	var ordersource = '${ordersource}';
	//来源是联盟或者网站才推送
	if(ordersource == '50'){
		var cvalue = $.cookie("source");
		if(cvalue == 'LTINFO'){
		 if(document.referrer!=''){
		    	var a_id = $.cookie("unionmsg");
				var m_id = 'yongle';
				var o_cd = '${ordersid}';//订单号
				var p_cd = '';//商品编号
				var price ='';//商品单价
				var it_cnt = '';//商品数量
				var c_cd  ='';//商品分类 c_cd =c_cd+products[4]+"||";
			    var propricenums = '${propricenum}'.split(";");
				for(var i =0;i<propricenums.length;i++){
					var products = propricenums[i].split(",");	
					p_cd  = p_cd +products[0]+"||";
					price = price+products[1]+"||";
					it_cnt = it_cnt+products[2]+"||";
					c_cd = c_cd+products[3]+"||";
				}
				p_cd = p_cd.substring(0, p_cd.length-2);
				price = price.substring(0, price.length-2);
				it_cnt = it_cnt.substring(0, it_cnt.length-2);
				c_cd = c_cd.substring(0, c_cd.length-2);
				document.write("<script src=http://service.linktech.cn/purchase_cps.php?a_id="+a_id+"&m_id="+m_id+"&o_cd="+o_cd+"&p_cd="+p_cd+"&price="+price+"&it_cnt="+it_cnt+"&c_cd="+c_cd+"><\/script>");		    	
		  }
		}else if(cvalue == 'duomai'){
				var hash = "620d9648cb02540f45598e8bc9ad782e"; //推送订单所需要的hash值
				var euid = $.cookie("unionmsg");
				var order_sn = '${ordersid}';//订单号
				var order_time = '${createtime}';//下单时间
				order_time = order_time.replace(" ","%20");
				var orders_price = '${ordersPrice}';//多麦规则下的订单金额     即用户实际支付的金额 去掉使用优惠券/现金券/快递费 等不计算佣金的那部分金额
				var discount_amount = '${ticket}';//使用现金券
				var promotion_code = '${cashcoupon}';//现金券号
				var status = '${starus}';//订单状态
				var rate = '0.03';
				var commission  =  ('${ordersPrice}'*0.03).toFixed(2);
				var commission_type = '';//商品佣金类型
				var propricenums = '${propricenum}'.split(";");
				var goods_id = '';//商品编号
				var goods_name = '';//商品名称
				var goods_price ='';//商品单价
				var goods_ta = '';//商品数量
				var goods_cate  ='';//商品分类 c_cd =c_cd+products[4]+"|";
				var goods_cate_name = '';//商品分类名称
				for(var i =0;i<propricenums.length;i++){
					var products = propricenums[i].split(",");	
					goods_id  = goods_id +products[0]+"|";
					goods_price = goods_price+products[1]+"|";
					goods_ta = goods_ta+products[2]+"|";
					goods_cate = goods_cate+products[3]+"|";
					goods_cate_name = goods_cate_name+products[4]+"|";
					goods_name = goods_name + products[5]+"|";
					commission_type = commission_type + 'ylpw' + "|";
				}
				goods_id = goods_id.substring(0, goods_id.length-1);
				goods_price = goods_price.substring(0, goods_price.length-1);
				goods_ta = goods_ta.substring(0, goods_ta.length-1);
				goods_cate = goods_cate.substring(0, goods_cate.length-1);
				goods_cate_name = goods_cate_name.substring(0, goods_cate_name.length-1);
				commission_type = commission_type.substring(0, commission_type.length-1);
				goods_name = goods_name.substring(0, goods_name.length-1);
				document.write("<script src=http://www.duomai.com/api/order.php?hash="+hash+"&euid="+euid+"&order_sn="+order_sn+"&order_time="+order_time+"&orders_price="+orders_price+"&discount_amount="+discount_amount+"&promotion_code="+promotion_code+"&status="+status+"&rate="+rate+"&commission="+commission+"&commission_type="+commission_type+"&goods_id="+goods_id+"&goods_name="+goods_name+"&goods_price="+goods_price+"&goods_ta="+goods_ta+"&goods_cate_name="+goods_cate_name+"&goods_cate="+goods_cate+"><\/script>");				
		};	
	}	
</script>
<script type="text/javascript">
function load(){
	location.href = "${payurl}";
}
</script>
<body onload="load()">
<img src="http://t.agrantsem.com/tker.gif?atsp=Win32&atsl=zh-CN&atsc=UTF-8&atscu=AG_383620_VERK&atsev=200&atstpc=${nzprice}&atsbbk=${oids}" width="1" height="1">
</body>
</html>